<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>乘法表</title>
<style type="text/css">
table {
    width: 800px;
    height: 300px;
    border-collapse: collapse;
}
td {
    border: 1px solid black;
}
body {
    text-align: center;
}
</style>
</head>
<body>
<script type="text/javascript">
    document.write("<table>");
    for ( var k = 1; k <=9 ; k++) {
        document.write("<tr>");
        for ( var i = 1; i <= k; i++) {
            document.write("<td>" + i + "*" + k +"="+ (i*k));
        }
        // 输出行数
        document.write("</tr>");
    }
</script>
</body>
</html>
